home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iLoadout.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  7KB  |  318 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // iLoadout.h
  5. //
  6. // Pog header file for the iLoadout package.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header:
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(iLoadout);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "iloadout" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. // Dependencies ///////////////////////////////////////////////////////////////
  28.  
  29. uses iShip;
  30.  
  31. // Type definitions ///////////////////////////////////////////////////////////
  32.  
  33. // Enumeration of ship types. Must tie in with the enumeration values in the
  34. // icLoadout class.
  35. enum eShip
  36.     S_CommandSection, 
  37.     S_Tug,
  38.     S_FastAttackShip,
  39.     S_HeavyCorvette,
  40.     S_StormPetrel,
  41.     S_Count
  42. };
  43.  
  44. // The various loadout options.
  45. enum eLoadout
  46. {
  47.     L_Empty,
  48.     L_Standard,
  49.     L_Assault,
  50.     L_Stealth,
  51.     L_ECM,
  52.     L_Custom1,
  53.     L_Custom2,
  54.     L_Count
  55. };
  56.  
  57. // The success of a rearming operation - see iLoadout.RearmFromJaffs.
  58. // Maintain in parallel with icLoadout.
  59. enum eRearmSuccess
  60. {
  61.     RS_CompleteRefit,
  62.     RS_PartialRefit,
  63.     RS_NoRefitPossible,
  64.     RS_RefitUnnecessary
  65. };
  66.  
  67. // Loadout management /////////////////////////////////////////////////////////
  68.  
  69. //
  70. // bool iLoadout.LoadoutActive()
  71. //
  72. // Is there currently a loadout active?
  73. //
  74. prototype bool iLoadout.LoadoutActive();
  75.  
  76. //
  77. // bool GoodToGo()
  78. //
  79. // Is the ship chosen and the loadout valid?
  80. //
  81. prototype bool iLoadout.GoodToGo();
  82.  
  83. //
  84. // eLoadout CurrentLoadout()
  85. //
  86. // The loadout chosen for the current ship
  87. //
  88. prototype eLoadout iLoadout.CurrentLoadout();
  89.  
  90. //
  91. // string LoadoutName( eLoadout loadout )
  92. //
  93. // The name of the loadout chosen for the current ship
  94. //
  95. prototype string iLoadout.LoadoutName( eLoadout loadout );
  96.  
  97. //
  98. // iLoadout.CalculateLoadout
  99. //
  100. // Work out the ship loadout best suited to the given loadout choice.
  101. //
  102. prototype iLoadout.CalculateLoadout( eLoadout loadout );
  103.  
  104. //
  105. // string iLoadout.LoadoutDescription
  106. //
  107. // An HTML description of the current loadout.
  108. //
  109. prototype string iLoadout.LoadoutDescription();
  110.  
  111. //
  112. // eLoadout iLoadout.LoadoutFromInt( int loadout )
  113. //
  114. // Convert the loadout from an int to a member of the loadout enumeration
  115. //
  116. prototype eLoadout iLoadout.LoadoutFromInt( int loadout );
  117.  
  118. //
  119. // int iLoadout.UnusedInternalCargoSlots
  120. //
  121. // Get the spare internal cargo slots
  122. //
  123. prototype int iLoadout.UnusedInternalCargoSlots();
  124.  
  125. // 
  126. // bool iLoadout.RemoteFighterMounted
  127. //
  128. // Do we have a remote fighter loaded out?
  129. //
  130. prototype bool iLoadout.RemoteFighterMounted(); 
  131.  
  132. // 
  133. // iLoadout.RemoveRemoteFighter
  134. //
  135. // Cancel any loaded out remote fighter 
  136. //
  137. prototype iLoadout.RemoveRemoteFighter(); 
  138.  
  139. //
  140. // iLoadout.RegisterAmmoType( string weapon_template )
  141. //
  142. // Register a type of ammo by the template of it's launcher or gun
  143. //
  144. prototype iLoadout.RegisterAmmoType( string weapon_template );
  145.  
  146. //
  147. // iLoadout.RemoveTurretFighters
  148. //
  149. // Take the existing loadout and remove any T-fighters from it. This is needed
  150. // whenever we plan to make the T-Fighters unavailable for a mission - you 
  151. // remove them from the loadout and then remove them from the inventory.
  152. //
  153. prototype iLoadout.RemoveTurretFighters();
  154.  
  155. //
  156. // iLoadout.TurretFightersInLoadout
  157. //
  158. // Get the number of turret fighters loaded out on the player ship
  159. //
  160. prototype int iLoadout.TurretFightersInLoadout();
  161.  
  162. //
  163. // iLoadout.SetDesiredNumberOfTurretFighters( int num_fighters )
  164. //
  165. // Set the desired number of turret fighters for automatic loadouts
  166. //
  167. prototype iLoadout.SetDesiredNumberOfTurretFighters( int num_fighters );
  168.  
  169. // Ship management ///////////////////////////////////////////////////////////
  170.  
  171. // 
  172. // eShip Ship()
  173. //
  174. // Get the current ship.
  175. //
  176. prototype eShip iLoadout.Ship();
  177.  
  178. // 
  179. // SetShip( eShip ship )
  180. //
  181. // Set the ship to fly.
  182. //
  183. prototype iLoadout.SetShip( eShip ship );
  184.  
  185. //
  186. // string ShipName( eShip ship )
  187. //
  188. // Get the name of the given ship
  189. //
  190. prototype string iLoadout.ShipName( eShip ship );
  191.  
  192. //
  193. // string ShipTypeName( eShip ship )
  194. //
  195. // Get the name of the type of the currently loaded out ship
  196. //
  197. prototype string iLoadout.ShipTypeName( eShip ship );
  198.  
  199. //
  200. // StripShip( hship ship )
  201. //
  202. // Strip the player ship (which is passed in) of all its systems and weapons.
  203. // This will cancel the current loadout. 
  204. //
  205. prototype iLoadout.StripShip( hship ship );
  206.  
  207. //
  208. // StripTurretFighters( list turret_fighters )
  209. //
  210. // Strip the given turret fighters of it's loaded out weaponary.
  211. //
  212. prototype iLoadout.StripTurretFighters( list turret_fighters );
  213.  
  214. //
  215. // eRearmSuccess RearmFromJaffs( hship ship )
  216. //
  217. // Attempt to rearm any ammo limited weapons from the player's inventory. 
  218. // Returns a value indicating how successful the rearming went.
  219. //
  220. prototype eRearmSuccess iLoadout.RearmFromJaffs( hship ship );
  221.  
  222. //
  223. // eRearmSuccess RearmFromThirdParty( hship ship, float refit_limit )
  224. //
  225. // Attempt to rearm any ammo limited weapons from a third party. The second 
  226. // argument defines what proportion of the total capacity of the weapon will
  227. // be refilled. i.e. if the refit limit was 0.5 then an assault cannon with a 
  228. // capacity of 1000 rounds will only be topped up by a maximum of 500 rounds.
  229. // Returns a value indicating how successful the rearming went.
  230. //
  231. prototype eRearmSuccess iLoadout.RearmFromThirdParty( 
  232.     hship ship, 
  233.     float refit_limit );
  234.  
  235. // Cargo management ///////////////////////////////////////////////////////////
  236.  
  237. //
  238. // SetCargo( int cargo_type )
  239. //
  240. // Set the cargo to attach to the player ship.
  241. //
  242. prototype iLoadout.SetCargo( int cargo_type );
  243.  
  244. //
  245. // int Cargo()
  246. //
  247. // Get the cargo to attach to the player ship.
  248. //
  249. prototype int iLoadout.Cargo();
  250.  
  251. // Customised loadout functions ///////////////////////////////////////////////
  252.  
  253. //
  254. // StartCustomisedLoadout
  255. //
  256. // Start a customised loadout in native code 
  257. //
  258. prototype iLoadout.StartCustomisedLoadout( 
  259.     hwindow splitter_window, 
  260.     hwindow text_box );
  261.  
  262. //
  263. // EndCustomisedLoadout
  264. //
  265. // Well, that just about wraps it up for this customised loadout.
  266. //
  267. prototype iLoadout.EndCustomisedLoadout();
  268.  
  269. //
  270. // iLoadout.UpdateCustomisedLoadoutTextBox
  271. //
  272. // Update the customised loadout text box
  273. //
  274. prototype iLoadout.UpdateCustomisedLoadoutTextBox();
  275.  
  276. //
  277. // iLoadout.OnCustomiseScreenSelect
  278. //
  279. // When an option is selected on the customised loadout screen, this function
  280. // is called.
  281. //
  282. prototype iLoadout.OnCustomiseScreenSelect();
  283.  
  284. //
  285. // bool iLoadout.OnCustomiseScreenBack
  286. //
  287. // To go back a mode in the customisation 
  288. //
  289. prototype bool iLoadout.OnCustomiseScreenBack();
  290.  
  291. //
  292. // int iLoadout.CustomisedLoadoutMode
  293. //
  294. // Get the current mode in the customised loadout
  295. //
  296. prototype int iLoadout.CustomisedLoadoutMode();
  297.  
  298. //
  299. // bool iLoadout.CargoSpaceWarning()
  300. //
  301. // Are we currently displaying a 'lack of cargo space' warning?
  302. //
  303. prototype bool iLoadout.CargoSpaceWarning();
  304.  
  305. // Window management //////////////////////////////////////////////////////////
  306.  
  307. //
  308. // iLoadout.SetManifestWindow
  309. //
  310. // Sets the manifest window
  311. //
  312. prototype iLoadout.SetManifestWindow( hwindow window );
  313.  
  314. // EOF ////////////////////////////////////////////////////////////////////////
  315.  
  316. #endif // FLUX_LIB
  317.